/*    */ package com.zimbra.cs.service.mail;
/*    */ 
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.common.soap.Element;
/*    */ import com.zimbra.cs.account.Account;
/*    */ import com.zimbra.cs.filter.RuleManager;
/*    */ import com.zimbra.soap.ZimbraSoapContext;
/*    */ import com.zimbra.soap.mail.message.GetOutgoingFilterRulesResponse;
/*    */ import java.util.Map;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public final class GetOutgoingFilterRules
/*    */   extends MailDocumentHandler
/*    */ {
/*    */   public Element handle(Element req, Map<String, Object> context)
/*    */     throws ServiceException
/*    */   {
/* 32 */     ZimbraSoapContext zsc = getZimbraSoapContext(context);
/* 33 */     Account account = getRequestedAccount(zsc);
/*    */     
/* 35 */     if (!canAccessAccount(zsc, account)) {
/* 36 */       throw ServiceException.PERM_DENIED("cannot access account");
/*    */     }
/*    */     
/* 39 */     GetOutgoingFilterRulesResponse resp = new GetOutgoingFilterRulesResponse();
/* 40 */     resp.addFilterRule(RuleManager.getOutgoingRulesAsXML(account));
/* 41 */     return zsc.jaxbToElement(resp);
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/service/mail/GetOutgoingFilterRules.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */